<?php if (!defined('THINK_PATH')) exit(); /*a:2:{s:75:"/webHome/host6366235/www/public/../application/home/view/my/attendance.html";i:1680881885;s:66:"/webHome/host6366235/www/application/home/view/public/footer3.html";i:1680881888;}*/ ?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title><?php echo $setting['webname']; ?>-我的考勤</title>
  <meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport"/>
  <meta content="yes" name="apple-mobile-web-app-capable"/>
  <meta content="black" name="apple-mobile-web-app-status-bar-style"/>
  <meta content="telephone=no" name="format-detection"/>
  <link rel="shortcut icon" href="/public/static/admin/uploads/set/<?php echo $setting['ico']; ?>">
  <!--日历Css样式-->
  <link rel="stylesheet" type="text/css" href="/public/static/home/css/Calendar.css">
  <!--jquery引用-->
  <script src="/public/static/home/js/jquery.min.js"></script>
  <!--日历js-->
  <script src="/public/static/home/js/calendar.js"></script>

  <link type="text/css" rel="stylesheet" href="/public/static/home/themes/css/base.css">
  <link type="text/css" rel="stylesheet" href="/public/static/home/themes/css/home.css">
  <link rel="stylesheet" href="/public/static/admin/css/font-awesome.css">

</head>
<body>
<section class="aui-flexView">
  <header class="aui-navBar aui-navBar-fixed b-line">
    <a href="javascript:history.back(-1)" class="aui-navBar-item">
      <i class="icon icon-return"></i>
    </a>
    <div class="aui-center">
      <span class="aui-center-title">考勤记录</span>
    </div>
    <a href="javascript:;" class="aui-navBar-item">
      <i class="icon icon-sys"></i>
    </a>
  </header>
  <section class="aui-scrollView">

     <div class="mui-content" style="width: 100%;margin-left: auto;margin-right:auto ">
        <div class="duty-list">
          <div id="calendar" ></div>
        </div>
     </div>

    <div class="divHeight"></div>
    <div class="aui-head-access">
      <div class="aui-head-access-hd">我的考勤</div>
      <span class="aui-head-access-fr aui-head-access-fr-clear">累计签到:<em id="yqd">0</em>次 --  累计缺勤:<em id="ljqq">0</em>次</span>
    </div>

    <div class="divHeight"></div>
    <div class="aui-grids">
      <a href="collection.html" class="aui-grids-item">
          <span id="cd">0</span>
          <span class="aui-grids-item-text">迟到</span>
      </a>
      <a href="friends.html" class="aui-grids-item">
          <span id="sj">0</span>
          <span class="aui-grids-item-text">事假</span>
      </a>
      <a href="friends.html" class="aui-grids-item">
          <span id="bj">0</span>
          <span class="aui-grids-item-text">病假</span>
      </a>
      <a href="friends.html" class="aui-grids-item">
         <span id="qq">0</span>
         <span class="aui-grids-item-text">缺勤</span>
      </a>
    </div>
    <div class="divHeight"></div>
  </section>
  <link href="/public/static/admin/css/font-awesome.css?v=4.4.0" rel="stylesheet">
<footer class="aui-footer">
    <a href="<?php echo url('Indexs/index',['tid'=>$tid]); ?>" class="aui-tabBar-item ">
            <span class="aui-tabBar-item-icon">
                <i class="icon icon-home"></i>
            </span>
        <span class="aui-tabBar-item-text">首页</span>
    </a>
    <a href="<?php echo url('My/register',['tid'=>$tid]); ?>" class="aui-tabBar-item ">
            <span class="aui-tabBar-item-icon">
                <i class="fa fa-user-plus" style="font-size:18px !important;"></i>
            </span>
        <span class="aui-tabBar-item-text">我要报名</span>
    </a>
    <!--<a href="news.html" class="aui-tabBar-item">-->
    <!--    <span class="aui-tabBar-item-icon">-->
    <!--        <i class="icon icon-find"></i>-->
    <!--    </span>-->
    <!--    <span class="aui-tabBar-item-text">消息</span>-->
    <!--</a>-->
    <!--<a href="community.html" class="aui-tabBar-item">-->
    <!--    <span class="aui-tabBar-item-icon">-->
    <!--        <i class="icon icon-comm"></i>-->
    <!--    </span>-->
    <!--    <span class="aui-tabBar-item-text">社区</span>-->
    <!--</a>-->
    <a href="<?php echo url('My/index',['tid'=>$tid]); ?>" class="aui-tabBar-item aui-tabBar-item-active">
            <span class="aui-tabBar-item-icon">
                <i class="icon icon-car"></i>
            </span>
        <span class="aui-tabBar-item-text">我的</span>
    </a>
</footer>
</section>


<script>
  $(function(){
    $.post("<?php echo url('Attendances/atten'); ?>",{id:"<?php echo $user['id']; ?>"},function(data){
        //日历标注
        $("#calendar").calendar({
          data: data.data,
          mode: "month",
          maxEvent: 5,
          showModeBtn: false,
          //  newDate: "2018-04-1",
          cellClick: function (events) {
            //viewCell的事件列表
          },
        })
       //统计数据
        $("#yqd").text(data.atten.yqd)
        $("#ljqq").text(data.atten.cd+data.atten.sj+data.atten.bj+data.atten.qq)
        $("#cd").text(data.atten.cd)
        $("#sj").text(data.atten.sj)
        $("#bj").text(data.atten.bj)
        $("#qq").text(data.atten.qq)
    })

    // var data = [
    //   { startDate: "2019-8-10", name: "事件" },
    //   { startDate: "2019-9-10", name: "事件" },
    //   { startDate: "2019-7-1", name: "事件" },
    //   { startDate: "2019-6-2", name: "请假" },
    //   { startDate: "2019-5-3", name: "已打卡" },
    //   { startDate: "2019-4-4", name: "请假" },
    //   { startDate: "2019-5-5", name: "已打卡" },
    //   { startDate: "2019-3-6", name: "已打卡" },
    //   { startDate: "2019-7-7", name: "事件" },
    //   { startDate: "2019-5-8", name: "请假" },
    //   { startDate: "2019-6-9", name: "已打卡" },
    //   { startDate: "2019-7-10", name: "事件" },
    //   { startDate: "2019-8-11", name: "事件" },
    //   { startDate: "2019-9-12", name: "事件" },
    //   { startDate: "2019-10-13", name: "事件" },
    //   { startDate: "2019-11-7", name: "事件" },
    //   { startDate: "2019-12-8", name: "请假" },
    //   { startDate: "2020-1-9", name: "已打卡" },
    //   { startDate: "2020-2-10", name: "事件" },
    //   { startDate: "2020-3-11", name: "事件" },
    //   { startDate: "2020-4-12", name: "事件" },
    //   { startDate: "2020-5-13", name: "事件" },
    //   { startDate: "2020-6-7", name: "事件" },
    //   { startDate: "2020-7-8", name: "请假" },
    //   { startDate: "2020-8-9", name: "已打卡" },
    //   { startDate: "2020-9-10", name: "事件" },
    //   { startDate: "2020-10-11", name: "事件" },
    //   { startDate: "2020-11-12", name: "事件" },
    //   { startDate: "2022-6-13", name: "已签到" },
    // ]
    //
    // $("#calendar").calendar({
    //   data: data,
    //   mode: "month",
    //   maxEvent: 5,
    //   showModeBtn: false,
    //   //  newDate: "2018-04-1",
    //   cellClick: function (events) {
    //     //viewCell的事件列表
    //   },
    // })

    //  if(spantxt="请假"){
    // 	$(this).find(".calendar-date").css("color","red");
    // }
    // if(spantxt="巡查"){
    // 	$(this).find(".calendar-date").css("color","red");
    // }
  })
</script>

</body>
</html>
